#include <stdio.h>
#include <stdlib.h>
#include "externdef.h"
#include "../macro.h"


int main(int argc, char *argv[]) {
  int c,nbtest=0;

  // wisdom must be created before running test
  EXIT_ON_ERROR(test_fft_1d_forward_cplx_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_1d_forward_cplx_fgFLOAT64);
  printf("\n");
  EXIT_ON_ERROR(test_fft_1d_backward_cplx_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_1d_backward_cplx_fgFLOAT64);
  printf("\n");


  EXIT_ON_ERROR(test_fft_1d_forward_real_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_1d_forward_real_fgFLOAT64);
  printf("\n");
  EXIT_ON_ERROR(test_fft_1d_backward_real_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_1d_backward_real_fgFLOAT64);
  printf("\n");


  EXIT_ON_ERROR(test_fft_2d_forward_cplx_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_2d_forward_cplx_fgFLOAT64);
  printf("\n");
  EXIT_ON_ERROR(test_fft_2d_backward_cplx_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_2d_backward_cplx_fgFLOAT64);
  printf("\n");

  EXIT_ON_ERROR(test_fft_2d_forward_real_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_2d_forward_real_fgFLOAT64);
  printf("\n");
  EXIT_ON_ERROR(test_fft_2d_backward_real_fgFLOAT32);
  EXIT_ON_ERROR(test_fft_2d_backward_real_fgFLOAT64);
  printf("\n");

  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgUINT8);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgUINT16);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgUINT32);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgINT8);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgINT16);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgINT32);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgFLOAT32);
  EXIT_ON_ERROR(test_flgr2d_fft_switch_corner_fgFLOAT64);
  printf("\n");

  EXIT_ON_ERROR(testconvolution_fgUINT8);
  EXIT_ON_ERROR(testconvolution_fgUINT16);
  EXIT_ON_ERROR(testconvolution_fgUINT32);
  EXIT_ON_ERROR(testconvolution_fgINT8);
  EXIT_ON_ERROR(testconvolution_fgINT16);
  EXIT_ON_ERROR(testconvolution_fgINT32);
  EXIT_ON_ERROR(testconvolution_fgFLOAT32);
  EXIT_ON_ERROR(testconvolution_fgFLOAT64);
  printf("\n");

  PRINT_TEST_NUMBER(nbtest);

  return 0;
}

